package top.eggcode.plugins.query.predicate;

import top.eggcode.plugins.query.model.ExpressionImpl;

/**
 * Title: 基础谓语
 * Description: TODO
 * Date: 2021/9/14 9:45
 *
 * @author JiaQi Ding
 * @version 1.0
 */
public abstract class AbstractPredicateImpl extends ExpressionImpl<Boolean> implements SimplePredicate {

    public AbstractPredicateImpl() {
        super(Boolean.class);
    }

    @Override
    public boolean isJunction() {
        return false;
    }

    @Override
    public boolean isNegated() {
        return false;
    }

    @Override
    public LinkOperator getOperator() {
        return LinkOperator.AND;
    }

    /**
     * 否定，修饰副词
     *
     * @return 结果取反
     */
    public Predicate not() {
        return new NegatedPredicateWrapper(this);
    }
}
